package com.ztgf.logistics.service.deppon;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.logistics.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.logistics.mapper.deppon.LogisticsBillOrderRemarkSnapshotMapper;
import com.ztgf.logistics.models.service.deppon.ILogisticsBillOrderRemarkSnapshotService;
import com.ztgf.logistics.models.bo.deppon.LogisticsBillOrderRemarkSnapshotSaveBO;
import com.ztgf.logistics.models.dto.deppon.LogisticsBillOrderRemarkSnapshotDTO;

/**
 * 物流订单详情快照表控制器
 *
 * @author mxli
 * @Date 2021-09-13 22:15:01
 */
@DubboService
public class LogisticsBillOrderRemarkSnapshotServiceImpl extends ServiceImpl<LogisticsBillOrderRemarkSnapshotMapper, LogisticsBillOrderRemarkSnapshotDTO> implements ILogisticsBillOrderRemarkSnapshotService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(LogisticsBillOrderRemarkSnapshotSaveBO saveBO) {
        LogisticsBillOrderRemarkSnapshotDTO dto = new LogisticsBillOrderRemarkSnapshotDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
